package cn.lingyangwl.agile.food.model.constants;

import cn.lingyangwl.framework.cache.core.key.ICacheKey;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.concurrent.TimeUnit;

/**
 * @author shenguangyang
 */
@Getter
@AllArgsConstructor
public enum ShopCacheKey implements ICacheKey {
    /**
     * 商品属性, arg1: 主租户id
     */
    GOODS_ATTR("shop:goods_attr:%s", 12, TimeUnit.HOURS),

    ;
    private final String key;
    private final int expire;
    private final TimeUnit unit;

    @Override
    public String getKey() {
        return this.key;
    }

    @Override
    public int getExpire() {
        return this.expire;
    }

    @Override
    public TimeUnit getUnit() {
        return this.unit;
    }
}
